package com.k8.common.aop.internal.pointcut;

import lombok.Data;

@Data
public class PackageNode {
    private PackageType type;
    private String value;

    public PackageNode(PackageType type, String value) {
        if (type != PackageType.defaultNode) throw new RuntimeException("type error");
        this.type = type;
        this.value = value;
    }

    public PackageNode(PackageType type) {
        if (type == PackageType.defaultNode) throw new RuntimeException("type error");
        this.type = type;
    }

    public enum PackageType {
        Any,//*
        include,//..
        defaultNode;//packageName
    }
}
